# api/urls.py
from django.urls import path, include
from rest_framework import viewsets
from rest_framework.routers import DefaultRouter
from api import views

router = DefaultRouter()
router.register(r'depart', views.DepartView)

urlpatterns = [
    path('depart/', include(router.urls)),
    path('depart/<int:depart_id>/', views.DepartDetailView.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'destroy'}), name='depart-detail'),  # 获取、更新或删除特定部门
]
